Brief Full Advanced Search Search Tips
|  |  | To access the contents, click the chapter and section titles. Visual Basic 6 Programming Blue Book: The Most Complete, Hands-On Resource for Writing Programs with Microsoft Visual Basic 6! (Publisher: The Coriolis Group) Author(s): Peter G. Aitken ISBN: 1576102815 Publication Date: 08/01/98 Search this book:
Previous | Table of Contents | Next
### Remote Automation Connection Manager If your application’s software components are going to be scattered across the network, an obvious problem is how a particular client application is going to know where its various components are located. Solving that problem is the job of the Remote Automation Connection Manager (RACM), which supplies a user-friendly interface with which you can tell your system where to find a particular component. This program (RACMGR32.EXE) is located in the System folder (Windows 95/98) or in the System32 folder (Windows NT). The RACM displays a list of all available component classes, as shown in Figure 24.1. The right side of the dialog box is used to specify the details of how a client application can make contact with the remote component. This information includes the network address of the remote computer where a component is located, the network protocol to be used for communication, and if required, the level of authentication to be used. Additional security options are set on the Client Access tab of the RACM. Figure 24.1 Defining a remote automation connection in the Remote Automation Connection Manager. Behind the scenes of the RACM, the component’s address in the registry is being changed between local and remote. When a specific component is specified as remote, the local symbol at the top of the RACM dialog box changes to a remote symbol (two connected boxes). You can quickly switch a specific component between local and remote, and back again, by selecting the appropriate command from the Register menu. Be aware, however that the RACM does not test the validity of the remote connection that you specify. Perhaps the best way to think about the RACM is as a type of telephone directory. When you want to talk to someone, you don’t really care where they are located, as long as you have the proper phone number to reach them. When you use the RACM to specify a component’s remote location, you essentially are changing its “phone number” in the registry. #### Automation Manager For a component to be available remotely, the computer on which it is located must be running the Automation Manager. This program, located in the System directory as AUTMGR32.EXE, runs in the background and intercepts client requests that come over the network. As Figure 24.2 shows, the Automation Manager’s window displays the number of current connections and the number of objects currently connected to. Figure 24.2 The Automation Manager. #### Visual Component Manager Undeniably, you cannot benefit from a software component if you don’t know that it exists. This problem is particularly acute in larger organizations where several, or even dozens, of people may be involved in writing applications for the enterprise. Joe Schmoe down the hall may already have written just the component that you need for your project—but how are you supposed to know about it? For component reuse to become reality, individual programmers need information not only about which components are available, but how each component can be used, as well. The Visual Component Manager, shown in Figure 24.3, performs this job. You start the Visual Component Manager (VCM) from Visual Basic’s View menu. Using the Visual Component Manager involves three parts. First, a component must be published, so that information about it is included in the VCM database. To publish a component, load the project files into Visual Basic and select Publish from the Tools menu. The Tools menu presents the following two options: Figure 24.3 The Visual Component Manager. • Source Files—Select this option if you want to publish the project source code files, making them available to other developers who may want to examine your code and perhaps make modifications to suit their exact needs. • Build Outputs—Select this option if you want to compile and publish the component’s executable files, making the component itself available to other developers who want to use it in their projects. Note that you can publish a component both as source files and as build outputs. Whichever publishing option you select, the Publishing Wizard walks you through the steps that are required in the publishing process, such as entering a description and selecting keywords for the component. Other ways to commence the publishing process are to right-click in the VCM dialog box and select New from the shortcut menu, or to select the component in Windows Explorer and drag it to a folder in the VCM. The second part of using Visual Component Manager is to find components. If a programmer needs a component for a specific task, the programmer can open the VCM and search to see whether a suitable component has been published. The VCM provides a flexible keyword and search mechanism. Components can be located by their name, type, description, keywords, and annotations. You don’t even need to know a component’s name to find it. Of course, the usefulness of the VCM’s search capabilities is completely dependent on the care that is used when components are published. If a component is published with too little descriptive detail, or with inappropriate keywords, then finding it in the VCM database will be difficult or impossible for other programmers. After a component is located, the final part of the VCM is to add the component to your Visual Basic project. This is probably the simplest part of using Visual Component Manager—simply right-click on the component in the VCM and select Add To Project from the shortcut menu. If the component requires COM registration, the VCM automatically performs this task. ### Summing Up This has been an extremely superficial introduction to client/server programming. It is a very complex subject, and I can’t do more than scratch the surface within a single chapter. At least you now have some idea of the techniques and capabilities of this powerful tool, and are equipped to seek out additional information if you ever need to use client/server programming. Numerous books are available that are devoted entirely to this subject.
Previous | Table of Contents | Next

| Products | Contact Us | About Us | Privacy | Ad Info | Home Use of this site is subject to certain Terms & Conditions, Copyright © 1996-2000 EarthWeb Inc. All rights reserved. Reproduction whole or in part in any form or medium without express written permission of EarthWeb is prohibited. Read EarthWeb's privacy statement.